package com.atmilan.quartz.constant.enums;

import com.baomidou.mybatisplus.core.enums.IEnum;
import com.fasterxml.jackson.annotation.JsonCreator;

/**
 * 商品图片类型
 * @author daigb
 * @date:  2022-03-28 10:43
 */
public enum ProductImageEnum implements IEnum<String> {
    GWPP1(1, true, "GWPP1", "官网实拍"),
    GWMT1(2, true, "GWMT1", "官网模特图"),
    SP1(3, true, "SP1", "店拍实拍"),
    SP(4, true, "SP", "自有实拍"),
    MT1(5, true, "MT1", "店拍模特"),
    MT(6, false, "MT", "自有模特图"),
    MX1(7, true, "MX1", "明星海报图 "),
//    HB1(8, true, "HB1", "海报图"),
    SP2(9, false, "SP2", "自拍视频"),
    SP3(10, true, "SP3", "店拍视频"),
    
    ;

    private final Integer sort;
	private final Boolean type;
    private final String name;
    private final String msg;

    ProductImageEnum(Integer sort, Boolean type, String name, String msg) {
        this.sort = sort;
        this.type = type;
        this.name = name;
        this.msg = msg;
    }

    public Integer getSort() {
		return sort;
	}

	public Boolean getType() {
		return type;
	}

	public String getName() {
		return name;
	}

	public String getMsg() {
		return msg;
	}
	
    @JsonCreator
    public static ProductImageEnum valueOfByName(String name) {
        for (ProductImageEnum value : values()) {
            if (name.equals(value.getName())) {
                return value;
            }
        }
        return ProductImageEnum.GWPP1;
    }

	@Override
	public String getValue() {
		return name;
	}

}

